#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QPaintEvent>
#include <QPainter>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    enum E_Action{
        ACTION_STOP = 0,
        ACTION_RIGHT,
        ACTION_LEFT,
        ACTION_UP,
        ACTION_DOWN
    };
    void setAction(E_Action action);

protected:
    void paintEvent(QPaintEvent *event);

private:
    void initView();

private:
    Ui::Widget *ui;
    E_Action m_action;
};

#endif // WIDGET_H
